package com.it.myd.help;

import com.it.myd.bean.box.world.Item;
import com.it.myd.bean.box.world.Items.AxeItem.*;
import com.it.myd.bean.box.world.Items.PickaxItem.*;

import java.util.ArrayList;
import java.util.List;


public class ItemLoader {

    public List<Item> getBaseItem(){
        List<Item> items = new ArrayList<>();
        items.add(getWoodAxe());
        items.add(getStoneAxe());
        items.add(getWoodPickax());
        items.add(getStonePickax());
        return items;
    }

    public Item getItem(String id){
        List<Item> items = getBaseItem();
        for (Item item: items) {
            if(item.getId().equals(id)){
                return item;
            }
        }
        return null;
    }
    public Item getStoneAxe(){
        Item stoneAxe = new StoneAxe();
        return stoneAxe;
    }

    public Item getWoodAxe(){
        Item woodAxe = new WoodAxe();
        return woodAxe;
    }

    public Item getWoodPickax(){
        Item woodPickax = new WoodPickax();
        return woodPickax;
    }

    public Item getStonePickax(){
        Item stonePickax = new StonePickax();
        return stonePickax;
    }
}
